﻿package components {
	import com.smartfoxserver.v2.entities.Room;
	
	public class Broadcast {
		
		public var theme:String;
		public var author:String;
		public var rating:int;
		public var listenersCount:int;
		public var time:int; //time left from the beginning
		
		public var id:int = 0;
		
		
		/*public function Broadcast(id:int):void {
			this.id = id;
			theme = "Topic " + id
			author = "Author " + id;
			trace("this.id = " + this.id);
		}*/
		
		public function Broadcast(room:Room):void {
			this.id = room.id;
			this.theme = room.name;
			this.author = "Author " + room.id;
			/*this.id = room.getVariable(GlobalStrings.ID).getValue();
			theme = room.getVariable(GlobalStrings.THEME).getValue();
			author = room.getVariable(GlobalStrings.AUTHOR).getValue();
			rating = room.getVariable(GlobalStrings.RATING).getValue();
			time = room.getVariable(GlobalStrings.TIME).getValue();
			listenersCount = room.getVariable(GlobalStrings.LCOUNT).getValue();*/			
		}
		/*public function Broadcast():void {			
		}*/
		
		/*public function setName(id:int):void {
			this.id = id;
			theme = "Topic " + id
			author = "Author " + id;
			trace("this.id = " + this.id);
		}*/
	}
}